While protecting your assemblies CodeVeil analyzes all the related assemblies and options and then obfuscates and encrypts the assemblies as necessary.
Initialize Phase | During the initialization phase, the individual assembly encoders are initialized, satellite assemblies are discovered. |
Analyze Phase | The analyze phase gathers information about all the assemblies, types and members to determine how they relate to each other and what is safe to obfuscate. Inter-assembly references are resolved for later synchronization. |
Protect Phase | When the project is completely analyzed CodeVeil will being adding the protection to those assemblies including obfuscating the types and members, encrypting code, strings and resource and adding runtime-protection. |
Save Phase | All the modifications are saved and any dependent assemblies are copied to the target folder. The assemblies are packaged into a single EXE or dll when bundling is enabled. |
Initialize Project Stage | ||
Initialize Search Paths | All of the search paths are resolved to their physical location relative to the project file location. CodeVeil's assembly reference helper classes are initialized with the additional paths to help in locating dependent assemblies. |
|
Initialize Assembly Encoders | Each of the assembly encoders is initialized with the path to the assembly to be encoded and the veiling settings associated with that assembly. |
|
Load Assemblies | The assembly is loaded from disk. |
|
Determine Dependencies | CodeVeil considers each of the assemblies in the project and determines dependencies between each of the assemblies. |
|
Initialize Assemblies Stage | ||
Load Satellite Assemblies | Any satellite assemblies are located and loaded into memory for later modification. |
|
Inject Helper Classes | CodeVeil adds a few helper classes to the veiled assembly |
|
Initialize Name Graph | The name graph is used during the Analyze Phase to determine all the inter-dependencies between types and members across all assemblies. The dependencies are later used during the Protect Phase to automatically update any references that were renamed during the Obfuscate step. |
Resolve Types Stage | The Name Graph is further resolved to map external references to types in other assemblies in the same project. |
|
Resolve Members Stage | ||
Resolve External Types | References to types not defined in any of the project assemblies are loaded and analyzed. This helps CodeVeil determine the exact properties of the obfuscated types to later determine which items can safely be renamed. |
|
Resolve Members | CodeVeil continues the analysis by determine the exact methods that obfuscated types implement and override. |
|
Resolve References | Any remaining references that could not be resolved earlier are resolved. |
Encode Stage | ||
Strip Debug Information | Any debug information left by the compilers is stripped from the assembly. |
|
Apply Obfuscation Rules | CodeVeil will apply the obfuscation selection rules to determine which types and members are eligible for renaming. During this phase many of the intrinsic naming and dependency standards expected by the .NET runtime will be enforced. |
|
Obfuscate | The types and members are now actually renamed. |
|
Obfuscate Everything | Calls to system assemblies and third party components are obfuscated. |
|
Generate Exception Map | The obfuscation map is saved so that CodeVeil can later translate stack traces with obfuscated references back to their original names. |
|
Collect Reference Targets | CodeVeil will search all the methods looking for user strings, resource references, Generics, and other call targets. |
|
Apply Anti-Reflection | Incorrect meta-data is inserted into the assembly that will cause offline disassembly tools like Reflector and ILDASM from reading the good meta-data. |
|
Fix Type References | References to types in other assemblies and in Generic types are fixed to point to their newly obfuscated names. |
|
Fix Member References | References to members in other types are fixed to point to their newly obfuscated names. |
|
Fix Attribute References | References to types in attribute properties are updated to point to their newly obfuscated names. |
|
Fix Resource References | CodeVeil will fix references to reference classes and fix resource pairs like form resources which share the name of the class that uses them. CodeVeil will also update the resource names in all the satellite assemblies. |
|
Encrypt Strings | Each of the methods collected in the Collect Reference Targets get their strings encrypted. |
|
Encrypt & Compress Resources | CodeVeil will encrypt and compress all the resources in the assembly and all satellite assemblies. |
|
Code Encryption | All of the methods that have been marked for encryption will have their MSIL code stripped and moved to secure storage within the assembly. CodeVeil adds the Runtime Executive to manage the decryption process at runtime. |
|
Add Anti-Debugging, Anti-Tracing, Anti-Profiling code | Runtime protection is added to keep the assembly safe even after it is distributed. |
Save Stage | ||
Save Exception Map | The exception map generated before will be saved. |
|
Backup Original | When Backup Originals is selected, CodeVeil will make a copy of the original assembly before saving the veiled version. |
|
Save Veiled Assembly | The veiled assembly is saved to the output folder. |
|
Save Satellite Assemblies | All the satellite assemblies are saved. |
|
Re-Sign Veiled Assemblies | If Strong Name Keys are supplied, CodeVeil will re-sign the modified assemblies. |
|
Collect Referenced Assemblies | If Collect Referenced Assemblies is selected, CodeVeil will copy all the dependent assemblies to the output folder. |
|
Bundle Project | When Whole Project Bundling and Encryption is used, all of the protected and collected assemblies in the project are compressed and bundled into a single EXE or dll. |